import request from '@/utils/request'
export function getActivityList(status, page, keywords, id) {
  return request({
    url: '/api/back/activity/list',
    method: 'get',
    params: { status, page, keywords, id }
  })
}
export function setStatus(id) {
  return request({
    url: '/api/back/activity/open',
    method: 'post',
    params: { id }
  })
}

// 删除活动
export function delActivity(data) {
  return request({
    url: '/api/back/activity/delete',
    method: 'post',
    data
  })
}
export function addActivityItem({ name, cover, start_at, end_at, banners, address, detail, link, id }) {
  return request({
    url: '/api/back/activity/update',
    method: 'post',
    data: { name, cover, start_at, end_at, banners, address, detail, link, id }
  })
}
export function activitySort({ id, sort }) {
  return request({
    url: '/api/back/activity/sort',
    method: 'post',
    data: { id, sort }
  })
}

export function getActivitySignList(params) {
  return request({
    url: '/api/back/activity/apply',
    method: 'get',
    params
  })
}

